package com.ymatou.iapi.auth.service;

import org.json.JSONObject;

import com.ymt.base.YmatouBaseCall;
import com.ymttest.utils.EnvSetup;
/**
*删除tokenCall
*FreeMaker Template自动生成代码
*/
public class UserRemoveTokenRequestDtoCall extends YmatouBaseCall{
	private static String opurl ="json/reply/UserRemoveTokenRequestDto";
	
	public UserRemoveTokenRequestDtoCall() {
		super(EnvSetup.getSystemUrl("auth_iapi"),opurl,"POST","JSON");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	/**
	 * 获取是否成功
	 * 
	 * @return Boolean
	 */
	public Boolean getSuccess() {
		Boolean Success = null;
		try {
			JSONObject jo = new JSONObject(getReturnData());
			Success = jo.getBoolean("Success");
		} catch (Exception e) {
			e.printStackTrace();
		}
		return Success;
	}
	/**
	 * 获取成功的code
	 * 
	 * @return Integer
	 */
	public Integer getCode() {
		Integer Success = null;
		try {
			JSONObject jo = new JSONObject(getReturnData());
			Success = jo.getInt("Code");
		} catch (Exception e) {
			e.printStackTrace();
		}
		return Success;
	}
	/**
	 * 获取成功的Result
	 * 
	 * @return String
	 */
	public String getResult() {
		String Success = null;
		try {
			JSONObject jo = new JSONObject(getReturnData());
			Success = jo.getString("Result");
		} catch (Exception e) {
			e.printStackTrace();
		}
		return Success;
	}
	
}